3.1.60 \(\int (a+b \tanh ^{-1}(c x^2)) \, dx\) [60]

Optimal. Leaf size=44 \[ a x+\frac {b \text {ArcTan}\left (\sqrt {c} x\right )}{\sqrt {c}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}}+b x \tanh ^{-1}\left (c x^2\right ) \]

[Out]

a*x+b*x*arctanh(c*x^2)+b*arctan(x*c^(1/2))/c^(1/2)-b*arctanh(x*c^(1/2))/c^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6021, 304, 209, 212} \begin {gather*} a x+\frac {b \text {ArcTan}\left (\sqrt {c} x\right )}{\sqrt {c}}+b x \tanh ^{-1}\left (c x^2\right )-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[a + b*ArcTanh[c*x^2],x]

[Out]

a*x + (b*ArcTan[Sqrt[c]*x])/Sqrt[c] - (b*ArcTanh[Sqrt[c]*x])/Sqrt[c] + b*x*ArcTanh[c*x^2]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 304

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]}
, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !
GtQ[a/b, 0]

Rule 6021

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x^n])^p, x] - Dist[b
*c*n*p, Int[x^n*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p
, 0] && (EqQ[n, 1] || EqQ[p, 1])

Rubi steps

\begin {align*} \int \left (a+b \tanh ^{-1}\left (c x^2\right )\right ) \, dx &=a x+b \int \tanh ^{-1}\left (c x^2\right ) \, dx\\ &=a x+b x \tanh ^{-1}\left (c x^2\right )-(2 b c) \int \frac {x^2}{1-c^2 x^4} \, dx\\ &=a x+b x \tanh ^{-1}\left (c x^2\right )-b \int \frac {1}{1-c x^2} \, dx+b \int \frac {1}{1+c x^2} \, dx\\ &=a x+\frac {b \tan ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}}-\frac {b \tanh ^{-1}\left (\sqrt {c} x\right )}{\sqrt {c}}+b x \tanh ^{-1}\left (c x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 57, normalized size = 1.30 \begin {gather*} a x+b x \tanh ^{-1}\left (c x^2\right )+\frac {b \left (2 \text {ArcTan}\left (\sqrt {c} x\right )+\log \left (1-\sqrt {c} x\right )-\log \left (1+\sqrt {c} x\right )\right )}{2 \sqrt {c}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[a + b*ArcTanh[c*x^2],x]

[Out]

a*x + b*x*ArcTanh[c*x^2] + (b*(2*ArcTan[Sqrt[c]*x] + Log[1 - Sqrt[c]*x] - Log[1 + Sqrt[c]*x]))/(2*Sqrt[c])

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 37, normalized size = 0.84

method result size
default \(a x +b x \arctanh \left (c \,x^{2}\right )+\frac {b \arctan \left (x \sqrt {c}\right )}{\sqrt {c}}-\frac {b \arctanh \left (x \sqrt {c}\right )}{\sqrt {c}}\) \(37\)
risch \(a x +\frac {b x \ln \left (c \,x^{2}+1\right )}{2}-\frac {b x \ln \left (-c \,x^{2}+1\right )}{2}+\frac {b \sqrt {-c}\, \ln \left (c x +\sqrt {-c}\right )}{2 c}-\frac {b \sqrt {-c}\, \ln \left (-c x +\sqrt {-c}\right )}{2 c}+\frac {b \ln \left (1-x \sqrt {c}\right )}{2 \sqrt {c}}-\frac {b \ln \left (1+x \sqrt {c}\right )}{2 \sqrt {c}}\) \(102\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+b*arctanh(c*x^2),x,method=_RETURNVERBOSE)

[Out]

a*x+b*x*arctanh(c*x^2)+b*arctan(x*c^(1/2))/c^(1/2)-b*arctanh(x*c^(1/2))/c^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 55, normalized size = 1.25 \begin {gather*} \frac {1}{2} \, {\left (c {\left (\frac {2 \, \arctan \left (\sqrt {c} x\right )}{c^{\frac {3}{2}}} + \frac {\log \left (\frac {c x - \sqrt {c}}{c x + \sqrt {c}}\right )}{c^{\frac {3}{2}}}\right )} + 2 \, x \operatorname {artanh}\left (c x^{2}\right )\right )} b + a x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c*x^2),x, algorithm="maxima")

[Out]

1/2*(c*(2*arctan(sqrt(c)*x)/c^(3/2) + log((c*x - sqrt(c))/(c*x + sqrt(c)))/c^(3/2)) + 2*x*arctanh(c*x^2))*b +
a*x

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 84 vs. \(2 (36) = 72\).
time = 0.42, size = 160, normalized size = 3.64 \begin {gather*} \left [\frac {b c x \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c x + 2 \, b \sqrt {c} \arctan \left (\sqrt {c} x\right ) + b \sqrt {c} \log \left (\frac {c x^{2} - 2 \, \sqrt {c} x + 1}{c x^{2} - 1}\right )}{2 \, c}, \frac {b c x \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c x + 2 \, b \sqrt {-c} \arctan \left (\sqrt {-c} x\right ) - b \sqrt {-c} \log \left (\frac {c x^{2} - 2 \, \sqrt {-c} x - 1}{c x^{2} + 1}\right )}{2 \, c}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c*x^2),x, algorithm="fricas")

[Out]

[1/2*(b*c*x*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 2*a*c*x + 2*b*sqrt(c)*arctan(sqrt(c)*x) + b*sqrt(c)*log((c*x^2 - 2
*sqrt(c)*x + 1)/(c*x^2 - 1)))/c, 1/2*(b*c*x*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 2*a*c*x + 2*b*sqrt(-c)*arctan(sqrt
(-c)*x) - b*sqrt(-c)*log((c*x^2 - 2*sqrt(-c)*x - 1)/(c*x^2 + 1)))/c]

________________________________________________________________________________________

Sympy [A]
time = 2.54, size = 702, normalized size = 15.95 \begin {gather*} a x + b \left (\begin {cases} \frac {4 c x \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} - \frac {c \left (- \frac {1}{c}\right )^{\frac {3}{2}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} + \frac {c \left (\frac {1}{c}\right )^{\frac {3}{2}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} - \frac {2 \sqrt {- \frac {1}{c}} \log {\left (x - \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} - \frac {3 \sqrt {- \frac {1}{c}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} + \frac {4 \sqrt {- \frac {1}{c}} \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} + \frac {4 \sqrt {- \frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} + \frac {2 \sqrt {\frac {1}{c}} \log {\left (x - \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} - \frac {3 \sqrt {\frac {1}{c}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{c^{2} \left (- \frac {1}{c}\right )^{\frac {3}{2}} \sqrt {\frac {1}{c}} - c^{2} \sqrt {- \frac {1}{c}} \left (\frac {1}{c}\right )^{\frac {3}{2}} + 6 c \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}}} & \text {for}\: c \neq 0 \\0 & \text {otherwise} \end {cases}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*atanh(c*x**2),x)

[Out]

a*x + b*Piecewise((4*c*x*sqrt(-1/c)*sqrt(1/c)*atanh(c*x**2)/(c**2*(-1/c)**(3/2)*sqrt(1/c) - c**2*sqrt(-1/c)*(1
/c)**(3/2) + 6*c*sqrt(-1/c)*sqrt(1/c)) - c*(-1/c)**(3/2)*log(x + sqrt(-1/c))/(c**2*(-1/c)**(3/2)*sqrt(1/c) - c
**2*sqrt(-1/c)*(1/c)**(3/2) + 6*c*sqrt(-1/c)*sqrt(1/c)) + c*(1/c)**(3/2)*log(x + sqrt(-1/c))/(c**2*(-1/c)**(3/
2)*sqrt(1/c) - c**2*sqrt(-1/c)*(1/c)**(3/2) + 6*c*sqrt(-1/c)*sqrt(1/c)) - 2*sqrt(-1/c)*log(x - sqrt(-1/c))/(c*
*2*(-1/c)**(3/2)*sqrt(1/c) - c**2*sqrt(-1/c)*(1/c)**(3/2) + 6*c*sqrt(-1/c)*sqrt(1/c)) - 3*sqrt(-1/c)*log(x + s
qrt(-1/c))/(c**2*(-1/c)**(3/2)*sqrt(1/c) - c**2*sqrt(-1/c)*(1/c)**(3/2) + 6*c*sqrt(-1/c)*sqrt(1/c)) + 4*sqrt(-
1/c)*log(x - sqrt(1/c))/(c**2*(-1/c)**(3/2)*sqrt(1/c) - c**2*sqrt(-1/c)*(1/c)**(3/2) + 6*c*sqrt(-1/c)*sqrt(1/c
)) + 4*sqrt(-1/c)*atanh(c*x**2)/(c**2*(-1/c)**(3/2)*sqrt(1/c) - c**2*sqrt(-1/c)*(1/c)**(3/2) + 6*c*sqrt(-1/c)*
sqrt(1/c)) + 2*sqrt(1/c)*log(x - sqrt(-1/c))/(c**2*(-1/c)**(3/2)*sqrt(1/c) - c**2*sqrt(-1/c)*(1/c)**(3/2) + 6*
c*sqrt(-1/c)*sqrt(1/c)) - 3*sqrt(1/c)*log(x + sqrt(-1/c))/(c**2*(-1/c)**(3/2)*sqrt(1/c) - c**2*sqrt(-1/c)*(1/c
)**(3/2) + 6*c*sqrt(-1/c)*sqrt(1/c)), Ne(c, 0)), (0, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 83 vs. \(2 (36) = 72\).
time = 0.40, size = 83, normalized size = 1.89 \begin {gather*} \frac {1}{2} \, {\left (c {\left (\frac {2 \, \sqrt {{\left | c \right |}} \arctan \left (x \sqrt {{\left | c \right |}}\right )}{c^{2}} - \frac {\sqrt {{\left | c \right |}} \log \left ({\left | x + \frac {1}{\sqrt {{\left | c \right |}}} \right |}\right )}{c^{2}} + \frac {\sqrt {{\left | c \right |}} \log \left ({\left | x - \frac {1}{\sqrt {{\left | c \right |}}} \right |}\right )}{c^{2}}\right )} + x \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right )\right )} b + a x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c*x^2),x, algorithm="giac")

[Out]

1/2*(c*(2*sqrt(abs(c))*arctan(x*sqrt(abs(c)))/c^2 - sqrt(abs(c))*log(abs(x + 1/sqrt(abs(c))))/c^2 + sqrt(abs(c
))*log(abs(x - 1/sqrt(abs(c))))/c^2) + x*log(-(c*x^2 + 1)/(c*x^2 - 1)))*b + a*x

________________________________________________________________________________________

Mupad [B]
time = 0.79, size = 55, normalized size = 1.25 \begin {gather*} a\,x+\frac {b\,\mathrm {atan}\left (\sqrt {c}\,x\right )}{\sqrt {c}}+\frac {b\,x\,\ln \left (c\,x^2+1\right )}{2}-\frac {b\,x\,\ln \left (1-c\,x^2\right )}{2}+\frac {b\,\mathrm {atan}\left (\sqrt {c}\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{\sqrt {c}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a + b*atanh(c*x^2),x)

[Out]

a*x + (b*atan(c^(1/2)*x))/c^(1/2) + (b*atan(c^(1/2)*x*1i)*1i)/c^(1/2) + (b*x*log(c*x^2 + 1))/2 - (b*x*log(1 -
c*x^2))/2

________________________________________________________________________________________